import { axios } from "../../utils/request";

const api = {
    list: "/crm/files/page",
    save: "/crm/files/save",
    disable: "/crm/files/disable",
    enable: "/crm/files/enable",
    delete: "/crm/files/delete"
};

/**
 * 列表
 */
export function pageList(parameter) {
  return axios({
    url: api.list,
    method: "get",
    params: parameter
  });
}

/**
 * 保存
 */
export function save(parameter) {
  return axios({
    url: api.save,
    method: "post",
    data: parameter
  });
}

/**
 * 停用
 */
export function disable(parameter) {
  return axios({
    url: api.disable,
    method: "post",
    data: parameter
  });
}

/**
 * 启用
 */
export function enable(parameter) {
  return axios({
    url: api.enable,
    method: "post",
    data: parameter
  });
}

/**
 * 删除
 */
export function deleteFiles(parameter) {
  return axios({
    url: api.delete,
    method: "get",
    params: parameter
  });
}